package com.bookmarket.service.impl;

import com.bookmarket.dao.CzgIndexTopDao;
import com.bookmarket.entity.Btype;
import com.bookmarket.entity.Custom_Discount;
import com.bookmarket.entity.Discount;
import com.bookmarket.service.CzgIIndexTopService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.websocket.Session;
import java.util.List;

/**
 * @author Chen Zhaoguang
 * @date 2018/1/5 14:37
 */
@Service("czgIndexTopService")
public class CzgIndexTopImpl implements CzgIIndexTopService {

    @Resource
    private CzgIndexTopDao czgIndexTopDao;
    @Override
    public List<Btype> findBtypeAll() {
        return czgIndexTopDao.findBtypeAll();
    }

    @Override
    public List<Discount> getAllDiscount() {
        return czgIndexTopDao.getAllDiscount();
    }

    @Override
    public List<Integer> getTwoId(int custom_id) {
        return czgIndexTopDao.getTwoId(custom_id);
    }

    @Override
    public boolean insertCd(int activeId,int customId){
        return czgIndexTopDao.insertCd(activeId,customId);
    }

    @Override
    public int reEnd(int id) {
        return czgIndexTopDao.reEnd(id);
    }


    public CzgIndexTopDao getCzgIndexTopDao() {
        return czgIndexTopDao;
    }

    public void setCzgIndexTopDao(CzgIndexTopDao czgIndexTopDao) {
        this.czgIndexTopDao = czgIndexTopDao;
    }
}
